<template>
    <div>
        <el-row class="tac">
        <el-col :span="24">
            <el-menu
            default-active="0"
            class="el-menu-vertical-demo"
            
            >
            <div v-for="(item,index) in asideArr" :key="index">
            <router-link :to="'/layout/'+item.path">
            <el-menu-item :index="index.toString()">
                <i :class="item.meta.icon"></i>
                <span slot="title">{{item.meta.title}}</span>
            </el-menu-item>
            </router-link>
           </div>
            </el-menu>
        </el-col>
         </el-row>

    </div>
</template>

<script>
export default {
  data(){return {
                    asideArr:[]
               }
        },
  created(){
      //想拿到所有的路由信息
      console.log(this.$router.options.routes[2].children);
      this.asideArr=this.$router.options.routes[2].children
  }
 
}
</script>

<style>

</style>